]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
status/volume: Snap to 100% when over-amplification is enabled
authorrevisto <therevisto@gmail.com>
Mon, 22 Dec 2025 21:35:03 +0000 (01:05 +0330)
committerMarge Bot <marge-bot@gnome.org>
Tue, 3 Feb 2026 13:11:37 +0000 (13:11 +0000)
Sound may be distorted when overamplifying. It is therefore
useful to make it easier for users to select exactly 100%
when allow-volume-above-100-percent is enabled, as that is
the highest non-distorted value.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7279
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4004>

js/ui/status/volume.js

index 0dbb2cefeb46fb069e7434d9ce25cdf76b0aca92..deadc16b734590cfa81b19cf5f24ec40ff6c9f45 100644 (file)
@@ -235,8 +235,13 @@ const StreamSlider = GObject.registerClass({
     _amplifySettingsChanged() {
         this._allowAmplified = this._soundSettings.get_boolean(ALLOW_AMPLIFIED_VOLUME_KEY);
 
-        this.slider.maximum_value = this._allowAmplified
+        const maxLevel = this._allowAmplified
             ? this.getMaxLevel() : 1;
+        this.slider.maximum_value = maxLevel;
+
+        this.slider.clearMarks();
+        if (this._allowAmplified)
+            this.slider.addMark(1);
 
         if (this._stream)
             this._updateVolume();